<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html><html>
    <head>
        <title>JimBergman.net - JavaScript: WebSocketTest</title>
        <script type="text/javascript">
            function WebSocketTest()
            {
                if ("WebSocket" in window)
                {
                    // Google example code
                    //  var ws = new WebSocket("ws://example.com/service");
                    //  ws.onopen = function()
                    //  {
                    //    // Web Socket is connected. You can send data by send() method
                    //    ws.send("message to send"); ....
                    //  };
                    //  ws.onmessage = function (evt) { var received_msg = evt.data; ... };
                    //  ws.onclose = function() { // websocket is closed. };
                    alert("WebSockets supported here!rnrnBrowser: " + navigator.appName + " " + navigator.appVersion + "rnrntest by jimbergman.net (based on Google sample code)");
                }
                else
                {
                    // the browser doesn't support WebSockets
                    alert("WebSockets NOT supported here!rnrnBrowser: " + navigator.appName + " " + navigator.appVersion + "rnrntest by jimbergman.net (based on Google sample code)");
                }
            }
    
        </script>
    </head>
    <body bgcolor="#FFFFFF">
        <a href="javascript:WebSocketTest()">Run WebSocket test</a>
    </body>
</html>